#!/bin/bash

MODEL="private.aluno"
ARQUIVO="$MODEL"
ARQUIVO="$ARQUIVO.json"

MAX=189

echo -ne "[" > "$ARQUIVO"

for ((i=1;i<$MAX;i++))
do
    echo -ne "
    {
        \"model\": \"$MODEL\",
        \"pk\": $i,
        \"fields\": {
            \"matricula\": \"`cat matricula | head -$i | tail -1`\"
        }
    },
    " >> "$ARQUIVO"
done

echo -ne "
]" >> "$ARQUIVO"

